package com.example.gatewaytest.controller;

import com.alibaba.fastjson.JSONObject;
import com.example.gatewaytest.ccb.CcbDecrypt;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author JiangMing Zhou
 * @date 2023/10/18 16:47
 * @jdk 1.8
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @PostMapping("/test")
    public void test(@RequestBody JSONObject jsonObject){
        CcbDecrypt ccbDecrypt = new CcbDecrypt();
        String body = ccbDecrypt.decryptBody(jsonObject.toJSONString());
        System.out.println(body);
    }
}
